﻿@model IEnumerable<Web.Models.TagDto>

@{
    ViewBag.Title = "title";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Wombat Tags</h2>
@if (Model.Any())
{
    <table class="ui-grid">
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Unit</th>
            <th>Actions</th>
        </tr>
        @foreach (var tag in Model)
        {
            <tr>
                <th>@tag.Id</th>
                <th class="ui-column-wide">@tag.Name</th>
                <th>@tag.Unit</th>
                <th>@Html.ActionLink("Goto", "Details", "Tag", new {id = tag.Id}, null)</th>
            </tr>
        }
    </table>
}
else
{
    <label>No tag is defined.</label>
}

<h2>@Html.ActionLink("Creat a new tag", "Create", "Tag", null, null)</h2>
